package me.zhengjie.modules.quartz.task.processing;

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.sync.processing.AreaSyncProcessing;
import me.zhengjie.modules.sync.processing.DistrictSyncProcessing;
import me.zhengjie.modules.sync.processing.EstateSyncProcessing;
import me.zhengjie.modules.sync.processing.FirsthandEstateSyncProcessing;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/*
* 区域/商圈/楼盘解析TASK
* */
@Slf4j
@Component
@Deprecated
public class PropertyDependentProcessingTask {
    @Autowired
    DistrictSyncProcessing districtSyncProcessing;

    @Autowired
    AreaSyncProcessing areaSyncProcessing;

    @Autowired
    EstateSyncProcessing estateSyncProcessing;

    public void processing(){
        //区域
        try {
            log.info("districtSyncProcessing run start");
            districtSyncProcessing.run();
            log.info("districtSyncProcessing run end");
        } catch (Exception e) {
            log.error("districtSyncProcessing error", e);
        }

        //商圈
        try {
            log.info("areaSyncProcessing run start");
            areaSyncProcessing.run();
            log.info("areaSyncProcessing run end");
        } catch (Exception e) {
            log.error("areaSyncProcessing error", e);
        }
        //楼盘
        try {
            log.info("estateSyncProcessing run start");
            estateSyncProcessing.run();
            log.info("estateSyncProcessing run end");
        } catch (Exception e) {
            log.error("estateSyncProcessing error", e);
        }
    }

}
